<template>
  <!-- 挂号收费页面 -->
  <div class="page-container">
    <el-card class="main-card">
      <template #header>
        <span class="main-title">挂号收费</span>
      </template>
      <!-- 挂号记录表格 -->
      <el-table :data="records" style="width: 100%; margin-top: 16px;" stripe highlight-current-row>
        <el-table-column type="index" label="序号" width="80" align="center" />
        <el-table-column prop="name" label="姓名" width="100" />
        <el-table-column prop="gender" label="性别" width="80" />
        <el-table-column prop="idCard" label="身份证号" width="180" />
        <el-table-column prop="registerTime" label="挂号时间" width="160" />
        <el-table-column prop="fee" label="应收费用(元)" width="120" />
        <el-table-column prop="status" label="状态" width="100">
          <template #default="scope">
            <el-tag :type="scope.row.status === '已收费' ? 'success' : 'info'">{{ scope.row.status }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column label="操作" width="120">
          <template #default="scope">
            <el-button size="small" type="primary" :disabled="scope.row.status === '已收费'" @click="charge(scope.$index)" class="main-btn">收费</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import { ElMessage } from 'element-plus'
// 挂号记录数据（前端模拟）
const records = ref([
  { name: '张三', gender: '男', idCard: '110101199001011234', registerTime: '2024-06-01 09:00', fee: 20, status: '未收费' },
  { name: '李四', gender: '女', idCard: '120101199202025678', registerTime: '2024-06-01 09:10', fee: 20, status: '未收费' },
  { name: '王五', gender: '男', idCard: '130101198503034321', registerTime: '2024-06-01 09:20', fee: 20, status: '已收费' }
])
// 收费操作
function charge(index) {
  records.value[index].status = '已收费'
  ElMessage.success('收费成功')
}
</script>

<style scoped>
.page-container {
  padding: 32px;
  background: linear-gradient(135deg, #e3f0ff 0%, #f5f7fa 100%);
  min-height: 100vh;
}
.main-card {
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(80,120,200,0.10), 0 1.5px 8px 0 rgba(80,120,200,0.08);
  transition: box-shadow 0.3s;
}
.main-card:hover {
  box-shadow: 0 12px 40px 0 rgba(80,120,200,0.16), 0 2px 12px 0 rgba(80,120,200,0.10);
}
.main-title {
  font-size: 22px;
  font-weight: 600;
  color: #1976d2;
  letter-spacing: 1px;
}
.main-btn {
  border-radius: 8px;
  background: linear-gradient(90deg, #42a5f5 0%, #1976d2 100%);
  font-weight: 600;
  letter-spacing: 1px;
  border: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.main-btn:hover {
  background: linear-gradient(90deg, #1976d2 0%, #42a5f5 100%);
  box-shadow: 0 4px 16px 0 rgba(33,150,243,0.12);
}
.el-table {
  border-radius: 10px;
  overflow: hidden;
}
.el-table__row:hover {
  background: #e3f2fd !important;
}
</style> 